import request from '@/utils/request'

// 删除权限
export const delPermissionAPI = (id) => {
  return request.delete(`/sys/permission/${id}`)
}

// 修改权限
export const updatePermissionAPI = (data) => {
  return request.put(`/sys/permission/${data.id}`, data)
}

// 获取权限详情
export const getPermissionDetailAPI = (id) => {
  return request.get(`/sys/permission/${id}`)
}

// 添加权限
export const addPermissionAPI = (data) => {
  return request.post('/sys/permission', data)
}

/**
 * 获取权限列表接口方法
 */
export const getPermissionsAPI = () => {
  return request.get('/sys/permission')
}
